<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="FieldFun.asp" -->
<%Fieldfl=request.QueryString("Fieldfl")
flid="flid"&Fieldfl%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<script type="text/javascript">
function checkAll(checkbox,name){
	var checkboxs = document.getElementsByName(name);
	for(var i=0;i<checkboxs.length;i++)checkboxs[i].checked = checkbox.checked;		
}
function silbingCheck(checkbox){
	checkbox.nextSibling.checked = checkbox.checked;
}
</script>
<BODY>
<%if request.querystring("field")="abb" then%>
<FORM name="form" action="?action=add" method="post" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="30" class="topnav"><div>增加<%=SortNames(Fieldfl) %>字段</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="stable" >
    <tr>
        <td width="9%" height="28" align="right" class="td">字段分类</td>
        <td width="91%"  class="td"><%=Fieldsorttype("Fieldfl",Fieldfl,"class=sel")%><font color="#ff0000">*</font></td>
      </tr>
      <tr>
        <td width="9%" height="28" align="right" class="td">字段名称</td>
        <td width="91%"  class="td"><input name="FieldName" type="text" class="inp" id="FieldName" size="30"  /><font color="#ff0000">*</font></td>
      </tr>
      <tr>
        <td width="9%" height="25" align="right" class="td">字段</td>
        <td class="td"><input name="Field_title" type="text" class="inp" id="Field_title" size="30"  />
          <font color="#ff0000">*</font>字段添加后不可修改,只能为英文</td>
      </tr>
    <tr>
        <td height="25" align="right" class="td">排序</td>
        <td class="td"><input name="FieldOrder" type="text" class="inp" id="FieldOrder" value="10" size="10"  /></td>
      </tr>
      <tr>
        <td height="25" align="right" class="td">&nbsp;</td>
        <td class="td"><INPUT class="btn" type="submit" value="添 加" />
<INPUT class="btn" type="button" value="返 回" onClick="history.go(-1)"/> 
</td>
      </tr>
    </table>
   </td>
  </tr>
</table>
</form>
<% End If %>
<%if request.querystring("field")="admin" then%>
<FORM name="" action="" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="30" class="topnav"><div><%=sorttypename%>字段管理</div>
 <span style="float:right"><INPUT onClick="location.href='Pro_Field.asp?Field=abb&Fieldfl=<%=Fieldfl%>'" type="button" value="添加字段" class="btn" > <INPUT onClick="location.href='admin_Content.asp?SortID=<%=Fieldfl%>'" type="button" value="<%=sorttypename%>列表" class="btn" ></span>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
    <table width="100%" border=0 align=center cellpadding=3 cellspacing=0 class="stable">
 	 <tr bgcolor="#eeeeee">
    <td width=50 align="center" class=td>选择</td>
    <td width=60 align="center" class=td>编号</td> 	 	
    <td width="120" height=28 align="center" class=td>字段分类</td>
    <td width="200" align="center" class=td>字段名称</td>
    <td width=200 align="center" class=td>字段</td>
    <td align="center" class=td>&nbsp;</td>
    <td width=74 align="center" class=td>排序</td>
    <td width=200 align="center" class=td>操作</td>
    </tr>
	<%fieldlist(fieldfl)%>
    <tbody>
    <tr>
     <td height="30" align="center"><INPUT onClick="checkAll(this,'id'),checkAll(this,'SpecField')" type="checkbox" value="1" name="SELALL"> &nbsp;</td>
    <td align="center">全选</td>
    <td colspan="6"><INPUT class="btn" type="submit" value="删 除" onClick="if(confirm('确定要删除吗')){form.action='?Field=admin&action=del';}else{return false};"/> 
    <INPUT class="btn" type="submit" value="更新排序" onClick="form.action='?action=order&Fieldfl=<%=Fieldfl%>';"/></td>
    </tr>
    </tbody>
    </table>
    </td>
  </tr>
</table></FORM>
<% End If %>

<%if request.querystring("field")="xiugai" then
FieldID=request.QueryString("Fieldid")
set rs=server.createobject("adodb.recordset") 
exec="select * from FieldSet where FieldID="&FieldID 
rs.open exec,conn,1,1
if rs.eof and rs.bof then
Response.Write "<script>alert('参数不正确，ID值不存在！');history.go(-1);</script>"
Response.End()
else
FieldID=rs("FieldID")
Fieldfl=rs("Fieldfl")
FieldName=rs("FieldName")
Field_title=rs("Field_title")
FieldOrder= rs("FieldOrder")
end if
%>
<FORM name="form" action="?action=edit" method="post" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="30" class="topnav"><div>修改<%=SortNames(Fieldfl) %>字段</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="stable" >
    <tr>
        <td width="9%" height="28" align="right" class="td">字段分类</td>
        <td width="91%"  class="td"><%=Fieldsorttype("Fieldfl",Fieldfl,"class=sel")%><input name="FieldID" type="hidden"id="FieldID" value="<%=FieldID%>" size="30"  /><font color="#ff0000">*</font></td>
      </tr>
      <tr>
        <td width="9%" height="28" align="right" class="td">字段名称</td>
        <td width="91%"  class="td"><input name="FieldName" type="text" class="inp" id="FieldName" value="<%= FieldName %>" size="30"  /><font color="#ff0000">*</font></td>
      </tr>
      <tr>
        <td width="9%" height="25" align="right" class="td">字段</td>
        <td class="td"><input name="Field_title" type="text" disabled="disabled" class="inp" id="Field_title" value="<%= Field_title %>" size="30"  />
          <font color="#ff0000">*</font>字段添加后不可修改</td>
      </tr>
    <tr>
        <td height="25" align="right" class="td">排序</td>
        <td class="td"><input name="FieldOrder" type="text" class="inp" id="FieldOrder" value="<%= FieldOrder %>" size="10"  /></td>
      </tr>
      <tr>
        <td height="25" align="right" class="td">&nbsp;</td>
        <td class="td"><INPUT class="btn" type="submit" value="更  新" />
		<INPUT class="btn" type="button" value="返 回" onClick="history.go(-1)"/> 
</td>
      </tr>
    </table>
   </td>
  </tr>
</table>
</form>
<% End If %>
<%call Footer%>
</body>
</html>
